var APP = require("../../../lib/main/app");
var Config = require("../../../lib/config/config");

var page = {
	categoryid:'',
	ready: function() {
		var that = this;
		// 头部处理
		var headerHeight = $('#header').height();
		$('body').css('padding-top', headerHeight);
		that.categoryid = api.pageParam.id;
		api.openFrame({
			name: 'web',
			url: 'https://www.weiyipro.com/h5-pc/#/login?token=cMvaFKIdEoWdmN8dJL1gssw7aV0NfHxizGMXZz6XkXl1WOKA3IqgnmSZ7ipBFxfsCJ%2BRyTsiN3QjLdYSzr%2B%2BloeOfH%2FPJhkTz6skC6HFvmk%3D',//https://dviz.yuanshuyiliao.com/dvisual/pc
			bounces: true,
			rect: { // 推荐使用Margin布局，用于适配屏幕的动态变化
				marginTop: headerHeight, // main页面距离win顶部的高度
				marginBottom: 0, // main页面距离win底部的高度
				w: 'auto' // main页面的宽度 自适应屏幕宽度
			}
		});
	},
	on: function() {
		var that = this;
		//批量事件start
		var events = [
			//打开页面
			['#add-channel', function() {

			}],
			// 关闭页面
			['#close', function() {
				APP.w.closeWin();
			}],
			
		];
		APP.e.more(events);
		//批量事件end
	},
	methods: {
		//加载数据
		initData: function() {
			var that = this;
		},
		
	}
}
API.run(page);
